<a href="#" class="dropdown-toggle" data-toggle="dropdown">
    <i class="fa <?= ($private ? 'fa-envelope-o' : 'fa-bell-o') ?>"></i>
    <?php if ($count): ?>
        <span class="label <?= ($private ? 'label-warning' : 'label-danger') ?>"><?= $count; ?></span>
    <?php endif; ?>
</a>
<?php if ($count): ?>
    <ul class="dropdown-menu">
        <li class="header">你有<?= $count ?>条<?= ($private ? '通知' : '公告') ?></li>
        <li>
            <!-- inner menu: contains the actual data -->
            <ul class="menu">
                <?php foreach ($models as $v): ?>
                    <li>
                        <a href="#">
                            <?= $v->titleIcon ?> <?= $v->title ?>
                        </a>
                    </li>
                <?php endforeach; ?>
            </ul>
        </li>
        <li class="footer"><a href="/notice/<?= ($private ? 'private' : 'index') ?>">查看全部</a></li>
    </ul>
<?php endif; ?>